package com.cheche.dn.domain.user;

import com.cheche.dn.common.base.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import javax.transaction.Transactional;

/**
 * Created by cheshun on 15/11/13.
 */
@org.springframework.stereotype.Service
public class UserService {
    private static Logger logger = LoggerFactory.getLogger(UserService.class);

    @Autowired
    private Service service;

    @Transactional
    public void test(User user) {
        logger.info("1111nickname:{}, modifyDate:{}", user.getNickname(), user.getModifyDate());
        user = service.conditionUpdate(user, new String[]{"nickname", "test"});
        logger.info("2222nickname:{}, modifyDate:{}", user.getNickname(), user.getModifyDate());

    }
}
